package com.jstyle.beatecg.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;


import com.jstyle.beatecg.R;
import com.jstyle.beatecg.view.widget.adapters.AbstractWheelTextAdapter;

import java.util.List;

public class WheelAdapter extends AbstractWheelTextAdapter {

	

	List<String> list;

	public WheelAdapter(Context context, List<String> list, int currentItem, int maxsize, int minsize) {
		super(context, R.layout.item_birth_year, NO_RESOURCE, currentItem, maxsize, minsize);
		this.list = list;
		this.currentIndex=currentItem;
		setItemTextResource(R.id.tempValue);
	}

	@Override
	public View getItem(int index, View cachedView, ViewGroup parent) {
		View view = super.getItem(index, cachedView, parent);
		return view;
	}

	@Override
	public int getItemsCount() {
		return list.size();
	}

	@Override
	public String getItemText(int index) {
		return list.get(index) + "";
	}

}
